\NoInterLetterSkip
\let\SamChe=\SamkNyisChung
\let\Sam=\SamkSum
\let\SamAu=\SamkSumChung
\font\SamSubt='SambhotaDege:script=tibt;+abvs;+blws' at 19pt
\def\HalfSentenceSkip{\hskip.3em plus.05em minus.05em}
\let\hsp=\HalfSentenceSkip
%
\vsize=207mm
\baselineskip=27pt plus 3pt
%
\headline={\ifodd\pageno \hfil \SamAu\firstmark%
\else \SamAu \chapname\hfil \fi}%
\footline={\ifodd\pageno\rightfootline \else\leftfootline\fi}
\def\rightfootline{\hfil\bigtenrm\folio}
\def\leftfootline{\bigtenrm\folio\hfil}
%
\def\plainoutput{\shipout%
  \vbox{
     \offinterlineskip % butt the boxes together
     \iftitle
        \global\titlefalse % reset the titlepage switch
     \else
        \makeheadline\headrule
     \fi
     \vskip-10pt\pagebody
     %\footrule
     \makefootline}%
  \advancepageno  
  \ifnum\outputpenalty>-20000 \else\dosupereject\fi}
%
\def\footrule{\vbox to 0pt{
  \vskip12pt
  \line{\leaders\hrule height1.5pt\hfill}
  \nointerlineskip
  \vskip2pt
  \line{\leaders\hrule height1.2pt\hfill}
  \vss}
}
%
\voffset=0.5cm
\maxdepth=0pt
% 標題前留白
\def\titleskip{\line{}\vskip-19pt}
%
\def\fourdivides{།\kern1pt །།  \kern1pt །}
% 向目錄文件.cnt寫入目录的宏定义
\newwrite\content
\def\LevelCntChap#1#2#3{%
    \write\content{#1}%目錄項的文字內容
    \write\content{#2}%該目錄項的級別
    \write\content{#3}%該目錄項需要占的行數
    \write\content{\the\pageno}%頁碼
}%
\def\chapter#1{\def\chapname{{#1}}\mark{{#1}}}
\def\section#1{\bigskip\centerline{\SamChe #1}\medskip}
\def\cntchap#1#2{\LevelCntChap{#2}{1}{#1}}%一級目錄項
\def\cntsection#1#2{\LevelCntChap{#2}{2}{#1}\mark{{#2}}}%二級
\def\cntsubsection#1#2{\LevelCntChap{#2}{3}{#1}}%三級
\def\cntsubsubsection#1#2{\LevelCntChap{#2}{4}{#1}}%四級
%\def\cntchap#1{\write\content{#1}\write\content{\the\pageno}}
